//
//  MusicPath.m
//  AVAudioPlayerDemo
//
//  Created by 小草毋正 on 2018/1/4.
//  Copyright © 2018年 C-LOVE. All rights reserved.
//

#import "MusicPath.h"

@implementation MusicPath

+ (NSArray *)musicPaths {
    return [[NSBundle mainBundle] pathsForResourcesOfType:@"mp3" inDirectory:nil];
}

+ (NSString *)musicNameWithPath:(NSString *)path {
    NSArray *array = [path componentsSeparatedByString:@"/"];
    NSString *name = [array lastObject];
    array = [name componentsSeparatedByString:@"."];
    name = [array firstObject];
    return name;
}


@end


